package server.dao;

import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import server.model.entity.Sign;

import java.util.List;

/**
 * 创建人:    xvzhe
 * 创建时间:
 * 修改时间:
 * 版本:      v1.0
 */
public interface SignDao extends JpaRepository<Sign, String> {
    @Query(value = "select * from sign where DATE_FORMAT(create_time,'%Y-%m-%d') = ?1 and user_id = ?2", nativeQuery = true)
    Sign findTime(String time, String userId);

    List<Sign> findByUserId(String userId);
}
